import { NavLink } from 'react-router-dom';
import "./foot.scss"
export class Foot extends React.Component {
    constructor(props) {
        super(props)
    }
    render() {
        let domList = this.props.footList.map(({ pathname, text, imgSrc1, imgSrc2 }, index) => (
            <NavLink to={pathname} key={index} activeClassName="active">
                <div className="foot-bg-img"><img src={location.href.indexOf(pathname) == -1 ? imgSrc1 : imgSrc2} /></div>
                <div className="foot-text"><span>{text}</span></div>
            </NavLink>
        ));
        return (
            <div className="foot">
                {domList}
            </div>
        )
    }
}